Adding an authentication source to an API
Prerequisites
Before starting with the steps for adding an authentication source to an API ensure you perform the following:
- In Integration, deploy an API Service or Proxy component.
- Add an authentication source on the Configure APIs and Applications > Deployed APIs page.
Procedure
-
On the Deployed APIs page, navigate to the Deployed API that you want to specify an authentication source for.
For APIs that you deploy to an environment that contains an API Gateway, the Authentication column has default text that reads API Key Controlled. This means that the API inherits its authentication from the API Key defined in the Application's subscriptions for that API Gateway on the Configure APIs and Applications > Applications page. Each subscription can have its own plan associated with it, allowing specific users to be given specific API Keys for customized access.
For APIs that you deploy to an environment that does not contain an API Gateway, the Authentication column has default text that reads runtime Controlled. This means that the API inherits its authentication based on the security set on the runtime within Integration.
-
Click the text in the Authentication column.
The Authentication Information page opens.
-
Specify Authentication Provider as the Authentication Type.
-
In the Authentication Source field, specify the source from the drop-down list.
-
Optional: Expand the Restrictions by Role section, click Add a Restriction, and select the appropriate internal role from the list. Then, click Finish.
To access a deployed API that has restricted roles, a user needs one of their roles to match the restricted role set in the Restrictions by Role section.
-
Click Save.
noteIf the authentication source is JWT, a notification displays with the redirect URI to add to your IDP for API execution using JWT in the Developer Portal.
API-key and authentication requirements
Assigning a JWT or Basic authentication source does not replace the API's API-key configuration. Unless a Keyless Plan is enabled, clients must supply a valid subscription API key and the credentials required by the authentication source. Enabling a Keyless Plan allows clients to omit the API key; it does not remove the configured JWT or Basic authentication requirement.
Before changing an API from API Key Controlled to an authentication provider, review its authentication source, associated plans, Keyless setting, and client request headers.
For configuration details and security considerations, see Keyless Plans.